<?php //ob_start("ob_gzhandler");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

<title><?php wp_title(''); ?><?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php bloginfo('name'); ?> </title>
<meta name="description" content="<?php bloginfo('description');?>" />
<meta name="generator" content="<?php bloginfo('version'); ?>" />
	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
	<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_head(); ?>
</head>
<body>

<div id="wrap">
<div id="flickr">
<?php

if( file_exists( ABSPATH . WPINC . '/rss.php') ) {
	require_once(ABSPATH . WPINC . '/rss.php');
} else {
	require_once(ABSPATH . WPINC . '/rss-functions.php');
}
$flickr_tag = get_option('flickrock');
if (!empty($flickr_tag)){
	$rss_url = 'http://www.flickr.com/services/feeds/photos_public.gne?tags='.$flickr_tag.'&format=rss_200';
	} else {
	$rss_url = 'http://www.flickr.com/services/feeds/photos_public.gne?tags=flowers&format=rss_200';
}
$rss = @fetch_rss($rss_url);

$rss->items = array_slice($rss->items, 0, 10);
foreach ($rss->items as $item ) {
	if(preg_match('<img src="([^"]*)" [^/]*/>', $item['description'],$imgUrlMatches)) {
		$imgurl = $imgUrlMatches[1];
		$imgurl = str_replace("_m.jpg", "_s.jpg", $imgurl);
	}
	echo '<img src="'.$imgurl.'" />';
}

?>
</div>